#pragma once

#include "defines.h"

template<typename t>
struct Plane {
 int width;
 int height;
 int size;
 t * points;
 t * operator[](int i) {
  return &points[i * height];
 }
 t & operator[](Vector<2> point) {
  return this->operator[]((int)point.x())[(int)point.y()];
 }
 Plane(number a,number b,t c) : width(a),height(b),size(a * b),points(new t[size]) {
  FORALL(size) {
   points[i] = c;
  }
 }
};
